<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			function Dog(name){
				if(!(this instanceof Dog)){
					return new Dog(name);
				}
				this.name = name;
			}
			var dog1 = Dog('xxx')
			console.log(dog1);
		</script>
	</body>
</html>
